# coding=utf-8
from multiprocessing import Process
from time import sleep


class MyProcess(Process):
    def __init__(self, name):
        Process.__init__(self)
        self.name = name

    def run(self):
        print(f"process:{self.name},start")
        sleep(3)
        print(f"process:{self.name},end")


if __name__ == '__main__':
    # 创建进程
    p1 = MyProcess("p1")
    p1.start()
